package com.xiupeilian.carpart.service.impl;

import com.xiupeilian.carpart.mapper.SysUserMapper;
import com.xiupeilian.carpart.model.SysUser;
import com.xiupeilian.carpart.service.UserService;
import com.xiupeilian.carpart.vo.LoginVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private SysUserMapper userMapper;
    @Override
    public SysUser findUserByVo(LoginVo vo) {
        return userMapper.findUserByVo(vo);
    }

    @Override
    public SysUser findUserByUsernameAndEmail(LoginVo vo) {
        return userMapper.findUserByUsernameAndEmail(vo);
    }

    @Override
    public void updateUser(SysUser user) {
        userMapper.updateByPrimaryKeySelective(user);
    }
}
